package jsyf.oa.dao.system;

import com.alibaba.dubbo.common.utils.StringUtils;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import jsyf.com.dao.BaseJdbcDao;
import jsyf.oa.entity.system.CompanyEntity;
import jsyf.oa.idao.BaseDao;
import jsyf.oa.ientity.IBaseEntity;
import org.springframework.stereotype.Repository;

import java.util.ArrayList;
import java.util.List;

/**
 * 枚举dao
 */
@Repository
public class EnumDao extends BaseDao {
    @Override
    public IBaseEntity convertJson2Entity(JSONObject json) {
        return null;
    }
    public List<JSONObject> selectByType(String enumType) {
        String strSql = "SELECT `KEY` AS `key`,`NAME` AS `name`,SORT AS sort  FROM T_SYS_ENUM WHERE TYPE='" + enumType + "' ORDER BY SORT DESC";
        return queryForJsonList(strSql);
    }
}
